inherited frmSBRF_Out: TfrmSBRF_Out
  Left = 366
  Top = 226
  Width = 609
  Height = 469
  Caption = #1042#1099#1075#1088#1091#1079#1082#1072' '#1076#1072#1085#1085#1099#1093' '#1074' '#1092#1086#1088#1084#1072#1090#1077' '#1057#1041#1056#1060
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 415
    Width = 601
    inherited BitBtn1: TBitBtn
      Left = 403
      Caption = #1043#1077#1085#1077#1088#1072#1094#1080#1103
    end
    inherited BitBtn2: TBitBtn
      Left = 502
    end
    object BitBtn3: TBitBtn
      Left = 304
      Top = 1
      Width = 97
      Height = 25
      Action = aStop
      Anchors = [akTop, akRight]
      Caption = #1057#1090#1086#1087
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clRed
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 2
    end
  end
  object PageControl1: TPageControl [1]
    Left = 0
    Top = 29
    Width = 601
    Height = 386
    ActivePage = TabSheet1
    Align = alClient
    TabOrder = 2
    object TabSheet1: TTabSheet
      Caption = #1042#1099#1075#1088#1091#1079#1082#1072
      object Panel3: TPanel
        Left = 0
        Top = 0
        Width = 593
        Height = 45
        Align = alTop
        BevelOuter = bvNone
        TabOrder = 0
        object Label2: TLabel
          Left = 8
          Top = 27
          Width = 127
          Height = 13
          Alignment = taRightJustify
          Caption = #1042#1099#1075#1088#1091#1079#1080#1090#1100' '#1074' '#1076#1080#1088#1077#1082#1090#1086#1088#1080#1102
        end
        object Label1: TLabel
          Left = 72
          Top = 6
          Width = 63
          Height = 13
          Alignment = taRightJustify
          Caption = #1050#1086#1076' '#1082#1083#1080#1077#1085#1090#1072
        end
        object eReportsPath: TDBEditEh
          Left = 140
          Top = 24
          Width = 361
          Height = 19
          AlwaysShowBorder = True
          EditButtons = <
            item
              Style = ebsEllipsisEh
              OnClick = eReportsPathEditButtons0Click
            end>
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          Flat = True
          ParentFont = False
          TabOrder = 0
          Visible = True
        end
        object eCode: TDBEditEh
          Left = 140
          Top = 2
          Width = 121
          Height = 19
          AlwaysShowBorder = True
          EditButtons = <>
          Flat = True
          TabOrder = 1
          Visible = True
        end
      end
      object GroupBox3: TGroupBox
        Left = 0
        Top = 45
        Width = 593
        Height = 313
        Align = alClient
        Caption = ' '#1056#1077#1079#1091#1083#1100#1090#1072#1090' '
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 1
        object mLog: TMemo
          Left = 2
          Top = 15
          Width = 589
          Height = 296
          Align = alClient
          BorderStyle = bsNone
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -11
          Font.Name = 'MS Sans Serif'
          Font.Style = []
          ParentFont = False
          ScrollBars = ssVertical
          TabOrder = 0
        end
      end
    end
    object TabSheet2: TTabSheet
      Caption = #1053#1072#1089#1090#1088#1086#1081#1082#1080
      ImageIndex = 1
      object PageControl2: TPageControl
        Left = 0
        Top = 0
        Width = 593
        Height = 358
        ActivePage = TabSheet5
        Align = alClient
        TabOrder = 0
        object TabSheet5: TTabSheet
          Caption = #1058#1077#1082#1089#1090' '#1079#1072#1087#1088#1086#1089#1072
          ImageIndex = 2
          object mSQL: TMemo
            Left = 0
            Top = 32
            Width = 585
            Height = 298
            Align = alClient
            Lines.Strings = (
              
                'select ss.mainstr || cast(cast(ss.saldo as integer) as varchar(1' +
                '0)) as out_str, ss.saldo'
              'from'
              '  (select a.g_licschet||'#39'|'#39'||c.name||'#39'|'#39'||'
              
                '   substr(rt.name ||'#39','#39'|| sr.street ||'#39','#39'|| b.house || coalesce(' +
                #39'/'#39'||b.corps, '#39#39')||coalesce('#39','#39'||a.apparts, '#39#39')||coalesce('#39'-'#39'||a' +
                '.letter, '#39#39'), 1, '
              '60)||'#39'|'#39'||'
              
                '   s.group_id||'#39'|'#39'||substr(gr.name, 1, 25) ||'#39'|||'#39' as mainstr, s' +
                'um(-d.balance) as saldo'
              '  from abonents a'
              '    join buildings b on b.id = a.building_id    '
              '    join rstreets sr on sr.code = b.street_id'
              '    join pas_rtown rt on rt.id = sr.town_id'
              '    join clients c on c.id = a.client_id'
              '    join dogovors d on d.abonent_id = a.id'
              '    join services s on s.id = d.service_id'
              '    join services gr on gr.id = s.group_id'
              '  where a.is_active = 1'
              '    group by 1'
              '  having sum(d.balance) < -0.1) as ss')
            ScrollBars = ssVertical
            TabOrder = 0
          end
          object Panel4: TPanel
            Left = 0
            Top = 0
            Width = 585
            Height = 32
            Align = alTop
            BevelOuter = bvNone
            TabOrder = 1
            object Button1: TButton
              Left = 172
              Top = 2
              Width = 241
              Height = 25
              Action = aRestQuery
              TabOrder = 0
            end
          end
        end
      end
    end
  end
  inherited ToolBar1: TToolBar
    Width = 601
  end
  inherited ActionList1: TActionList
    Images = MAIN.ImageList
    Left = 514
    Top = 88
    inherited aSave: TAction
      Caption = #1043#1077#1085#1077#1088#1072#1094#1080#1103
      Hint = #1043#1077#1085#1077#1088#1072#1094#1080#1103
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
    object aRestQuery: TAction
      Caption = #1042#1086#1089#1089#1090#1072#1085#1086#1074#1080#1090#1100' '#1079#1072#1087#1088#1086#1089' "'#1087#1086' '#1091#1084#1086#1083#1095#1072#1085#1080#1102'"'
      Hint = #1042#1086#1089#1089#1090#1072#1085#1086#1074#1080#1090#1100' '#1079#1072#1087#1088#1086#1089' "'#1087#1086' '#1091#1084#1086#1083#1095#1072#1085#1080#1102'" '#1080#1079' '#1082#1086#1084#1087#1086#1085#1077#1085#1090#1099' '#1079#1072#1087#1088#1086#1089
      OnExecute = aRestQueryExecute
    end
    object aStop: TAction
      Caption = #1057#1090#1086#1087
      Enabled = False
      Hint = #1054#1089#1090#1072#1085#1086#1074#1080#1090#1100
      OnExecute = aStopExecute
    end
  end
  inherited PropStorage: TPropStorageEh
    Section = 'SBRFOut'
    StoredProps.Strings = (
      '<P>.Height'
      '<P>.Left'
      '<P>.PixelsPerInch'
      '<P>.Top'
      '<P>.Width'
      '<P>.WindowState'
      'PageControl1.TabSheet1.Panel3.eCode.<P>.Text'
      'PageControl1.TabSheet1.Panel3.eReportsPath.<P>.Text'
      'PageControl1.TabSheet2.PageControl2.TabSheet5.mSQL.<P>.Lines')
    Left = 520
    Top = 50
  end
  object dsData: TpFIBDataSet
    SelectSQL.Strings = (
      
        'select ss.mainstr || cast(cast(ss.saldo as integer) as varchar(1' +
        '0)) as out_str, ss.saldo'
      'from'
      '  (select a.g_licschet||'#39'|'#39'||c.name||'#39'|'#39'||'
      
        '   substr(rt.name ||'#39','#39'|| sr.street ||'#39','#39'|| b.house || coalesce(' +
        #39'/'#39'||b.corps, '#39#39')||coalesce('#39','#39'||a.apparts, '#39#39')||coalesce('#39'-'#39'||a' +
        '.letter, '#39#39'), 1, 60)||'#39'|'#39'||'
      
        '   s.group_id||'#39'|'#39'||substr(gr.name, 1, 25) ||'#39'|||'#39' as mainstr, s' +
        'um(-d.balance) as saldo'
      '  from abonents a'
      '    join buildings b on b.id = a.building_id    '
      '    join rstreets sr on sr.code = b.street_id'
      '    join pas_rtown rt on rt.id = sr.town_id'
      '    join clients c on c.id = a.client_id'
      '    join dogovors d on d.abonent_id = a.id'
      '    join services s on s.id = d.service_id'
      '    join services gr on gr.id = s.group_id'
      '  where a.is_active = 1'
      '    group by 1'
      '  having sum(d.balance) < -0.1) as ss')
    Transaction = trRead
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Left = 504
    Top = 129
    object dsDataOUT_STR: TFIBStringField
      FieldName = 'OUT_STR'
      Size = 680
      EmptyStrToNull = True
    end
    object dsDataSALDO: TFIBBCDField
      FieldName = 'SALDO'
      Size = 2
      RoundByScale = True
    end
  end
  object trRead: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    CSMonitorSupport.Enabled = csmeDatabaseDriven
    Left = 472
    Top = 130
  end
end
